DC.remove(optionalCallbackFunction) Description: Removes all rendered elements and exicutes relevant lifecycle methods on the DC object. Returns: DC Object. Note: When DC.animate.onRemove is set to a valid function, it will apply related visual effects before the process of removal completes. An optional function can be passed as the first parameter to execute a temporary one-time callback after the removal process completes. Example: // Optionally apply a visual animation effect before the DC object is closed. DC.animate.onRemove = function(DC, wrapper, next) { // To ensure accessibility, make sure that the next() function is executed within the callback after the animation finishes. next(); }; // Close the DC object and remove all rendered content. DC.remove(); // Remove the DC object content and execute a one-time callback. DC.remove(function() { // Do stuff. alert(DC.id); });